# Maintainer: Thomas Aldrian <aldrian.thom@proton.me>
pkgname=py3-freetype-py
pkgver=2.4.0
pkgrel=1
pkgdesc="FreeType Python bindings"
url="https://github.com/rougier/freetype-py"
arch="all"
license="BSD-3-Clause"
depends="freetype"
makedepends="
	py3-gpep517
	py3-setuptools
	py3-setuptools_scm
	py3-wheel
	"
checkdepends="py3-pytest"
source="$pkgname-$pkgver.tar.gz::https://github.com/rougier/freetype-py/archive/refs/tags/v$pkgver.tar.gz"
builddir="$srcdir/freetype-py-$pkgver/"

build() {
	export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver

	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest tests
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
82cdb06cfae90bb94b5a2c91235ebc39e03ed85da92db139f6edddc09e219b07a9b6983b0990998fb0baaab2e92c628cf08d9b90a635a91636e17d2b228109e7  py3-freetype-py-2.4.0.tar.gz
"
